package com.dragon.modules.yuegou.model.member;

import com.dragon.modules.yuegou.entity.member.ProDiscountEntity;
import com.dragon.modules.yuegou.enums.member.ProDiscountRoundingMode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品折扣表模型类
 * 
 * @author pbuilder generated
 * @date 2022-03-09 19:03:27
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class ProDiscount extends ProDiscountEntity {

	/**
	 * 构造一个空商品折扣表模型对象
	 */
	public ProDiscount(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商品折扣表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public ProDiscount(ProDiscountEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商品折扣表模型对象
	 * 
	 * @param other 其它对象
	 */
	public ProDiscount(ProDiscount other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置商品折扣ID
	 * 
	 * @param id 商品折扣ID
	 * @return 当前对象
	 */
    public ProDiscount id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈id
	 * 
	 * @param busdId 商圈id
	 * @return 当前对象
	 */
    public ProDiscount busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getName() {
    	return name;
    }

    /**
	 * 设置权益名称
	 * 
	 * @param name 权益名称
	 * @return 当前对象
	 */
    public ProDiscount name(String name) {
    	this.name = name;
    	return this;
    }

	@Override
	public String getContent() {
    	return content;
    }

    /**
	 * 设置权益内容
	 * 
	 * @param content 权益内容
	 * @return 当前对象
	 */
    public ProDiscount content(String content) {
    	this.content = content;
    	return this;
    }

	@Override
	public BigDecimal getRate() {
    	return rate;
    }

    /**
	 * 设置折扣比率
	 * 
	 * @param rate 折扣比率
	 * @return 当前对象
	 */
    public ProDiscount rate(BigDecimal rate) {
    	this.rate = rate;
    	return this;
    }

	@Override
	public BigDecimal getPlatformRate() {
    	return platformRate;
    }

    /**
	 * 设置平台分摊
	 * 
	 * @param platformRate 平台分摊
	 * @return 当前对象
	 */
    public ProDiscount platformRate(BigDecimal platformRate) {
    	this.platformRate = platformRate;
    	return this;
    }

	@Override
	public BigDecimal getMerchantRate() {
    	return merchantRate;
    }

    /**
	 * 设置商户分摊
	 * 
	 * @param merchantRate 商户分摊
	 * @return 当前对象
	 */
    public ProDiscount merchantRate(BigDecimal merchantRate) {
    	this.merchantRate = merchantRate;
    	return this;
    }

	@Override
	public Boolean getEnableStatus() {
    	return enableStatus;
    }

    /**
	 * 设置启用状态（1：启用 0：禁用）
	 * 
	 * @param enableStatus 启用状态（1：启用 0：禁用）
	 * @return 当前对象
	 */
    public ProDiscount enableStatus(Boolean enableStatus) {
    	this.enableStatus = enableStatus;
    	return this;
    }

	@Override
	public Integer getAccuracy() {
    	return accuracy;
    }

    /**
	 * 设置保留小数
	 * 
	 * @param accuracy 保留小数
	 * @return 当前对象
	 */
    public ProDiscount accuracy(Integer accuracy) {
    	this.accuracy = accuracy;
    	return this;
    }

	@Override
	public ProDiscountRoundingMode getRoundingMode() {
    	return roundingMode;
    }

    /**
	 * 设置[枚举]取整方式：0-向上取整-UP、1-向下取整-DOWN、2-四舍五入-HALF_UP
	 * 
	 * @param roundingMode [枚举]取整方式：0-向上取整-UP、1-向下取整-DOWN、2-四舍五入-HALF_UP
	 * @return 当前对象
	 */
    public ProDiscount roundingMode(ProDiscountRoundingMode roundingMode) {
    	this.roundingMode = roundingMode;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置
	 * 
	 * @param createdTime 
	 * @return 当前对象
	 */
    public ProDiscount createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public String getCreatedBy() {
    	return createdBy;
    }

    /**
	 * 设置
	 * 
	 * @param createdBy 
	 * @return 当前对象
	 */
    public ProDiscount createdBy(String createdBy) {
    	this.createdBy = createdBy;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedTime 
	 * @return 当前对象
	 */
    public ProDiscount modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }

	@Override
	public String getModifiedBy() {
    	return modifiedBy;
    }

    /**
	 * 设置
	 * 
	 * @param modifiedBy 
	 * @return 当前对象
	 */
    public ProDiscount modifiedBy(String modifiedBy) {
    	this.modifiedBy = modifiedBy;
    	return this;
    }

	@Override
	public Boolean getDel() {
    	return del;
    }

    /**
	 * 设置删除 0-未删除；1-已删除
	 * 
	 * @param del 删除 0-未删除；1-已删除
	 * @return 当前对象
	 */
    public ProDiscount del(Boolean del) {
    	this.del = del;
    	return this;
    }

	@Override
	public LocalDateTime getDelTime() {
    	return delTime;
    }

    /**
	 * 设置
	 * 
	 * @param delTime 
	 * @return 当前对象
	 */
    public ProDiscount delTime(LocalDateTime delTime) {
    	this.delTime = delTime;
    	return this;
    }

	@Override
	public String getDelBy() {
    	return delBy;
    }

    /**
	 * 设置
	 * 
	 * @param delBy 
	 * @return 当前对象
	 */
    public ProDiscount delBy(String delBy) {
    	this.delBy = delBy;
    	return this;
    }
}
